﻿//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////  LIBRERIA: SIMA.CORE                                                                                             ////
////  DESARROLLADO POR JUAN CARLOS VEGA NEIRA                                                                         ////
////  UNIVERSIDAD RICARDO PALMA                                                                                       ////
////  CURSO DE TALLER DE GERENTCIA DE PROYECTOS                                                                       ////
////  SEMESTRE 2010 - II                                                                                              ////
////  SEPTIEMBRE, 2010                                                                                                ////
////  TODOS LOS DERECHOS RESERVADOS                                                                                   ////
////  VERSIÓN v1.0                                                                                                    ////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

using System;

using SIMA.Core.Enums;

namespace SIMA.Core.EventArgs
{
    [Serializable]
    public class FailedEventArgs : System.EventArgs
    {
        #region Fields

        private string queryName = string.Empty;
        private DateTime instantFailed;
        private Exception exceptionOcurred;
        private Operations operations;

        #endregion

        #region Properties

        public string QueryString
        {
            get
            {
                return queryName;
            }
        }

        public DateTime InstantFailed
        {
            get
            {
                return instantFailed;
            }
        }

        public Exception ExceptionOcurred
        {
            get
            {
                return exceptionOcurred;
            }
        }

        public Operations Operation
        {
            get
            {
                return operations;
            }
        }

        #endregion

        #region Constructor

        public FailedEventArgs(string queryName, Exception ex, Operations oper)
        {
            this.queryName = queryName;
            instantFailed = DateTime.Now;
            exceptionOcurred = ex;
            operations = oper;
        }

        #endregion

    }
}
